<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: fzy-2
  Date: 2021/5/18
  Time: 16:16
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<% String path = request.getContextPath(); %>
<html>
<head>
    <meta charset="utf-8">
    <title>上机考试系统</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <!-- le styles -->
    <link href="<%=path%>/css/bootstrap.css" rel="stylesheet">
    <link href="<%=path%>/css/exam.css" rel="stylesheet">
    <style>
        body {
            padding-top: 60px;
            /* 60px to make the container go all the way to the bottom of the topbar */
        }
    </style>
    <link href="<%=path%>/css/bootstrap-responsive.css" rel="stylesheet">

    <!-- le html5 shim, for ie6-8 support of html5 elements -->
    <!--[if lt ie 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
</head>

<body>

<%@ include file="/WEB-INF/pages/Admin/admin_header.jsp"%>

<div class="container">

    <h1>
        <img src="<%=path%>/img/exam-admin.png"  alt=""/> 系统管理
    </h1>

    <c:if test="${adminid == 0}">
        <div class="exam-alert">没有设置管理员帐号，默认管理员帐号存在安全风险，请尽快处理！</div>
    </c:if>


    <form class="exam-form form-horizontal" action="${pageContext.request.contextPath}/admin/admin_teacher_edit" method="post">
        <h4>修改教师帐号</h4>
        <% String id = request.getParameter("id"); %>
        <input type="hidden" name="id" value="<%=id%>"/>
        <div class="control-group">
            <label class="control-label" for="name">用户名</label>
            <div class="controls">
                <label>
                    <input type="text" id="name" name="name" value="${name}" />
                </label>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="pass">密码</label>
            <div class="controls">
                <label>
                    <input type="text" id="pass" name="pass" placeholder="重置密码" />
                </label> <span>如不需要重新设定密码请留空</span>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="fullname">全名</label>
            <div class="controls">
                <label>
                    <input type="text" id="fullname" name="fullname" value="${fullname}" />
                </label>
            </div>
        </div>
        <div class="control-group">
            <div class="controls">
                <label class="checkbox">
                <c:if test="${isadmin == true}">
                    <input type="checkbox" name="isadmin" checked="checked" value="true"/>
                </c:if>
                <c:if test="${isadmin == false}">
                    <input type="checkbox" name="isadmin" value="true"/>
                </c:if> 管理员&nbsp;
                </label>
                <label>
                    <input type="hidden" name="isadmin" checked="checked" value="1"/>
                </label>
            </div>
        </div>
        <div class="control-group">
            <div class="controls">
                <input type="submit" name="action" class="btn btn-primary" value="修改" />
            </div>
        </div>
    </form>


</div>
<!-- /container -->
<!-- placed at the end of the document so the pages load faster -->
<script src="<%=path%>/js/jquery.min.js"></script>
<script src="<%=path%>/js/bootstrap.min.js"></script>
</body>
</html>